package org.programmers.anonymous.fightrobots.controller;

import java.util.List;

import org.programmers.anonymous.fightrobots.dao.IWeaponDao;
import org.programmers.anonymous.fightrobots.model.IWeapon;
/**
 * 
 * @refactor Daniel Cruz, Francisco Villalba
 *
 */
public interface IWeaponController {

	/**
	 * Initialize the Weapon list from Data Base
	 */
	public void init();
	
	/**
	 * Create a new Weapon, save it.
	 * @param name
	 * @param power
	 * @param hits
	 * @return The new Weapon
	 */
	public IWeapon createWeapon(String name, int power, int hits);
	
	/**
	 * The link between the controller and the Dao
	 * @param iWeaponDao - The interface of Weapon Dao 
	 */
	public void setWeaponDao(IWeaponDao iWeaponDao);
		
	
	/**
	 * Remove the given Weapon
	 * @param w - Weapon to remove 
	 */
	public boolean delete(IWeapon w);
	
	/**
	 * Remove all Weapons
	 */
	public void deleteAllWeapons();
	
	/**
	 * 
	 * @return - The list of the weapons
	 */
	public List<IWeapon> getAllWeapons();

	/**
	 * Save a Weapon
	 * @param theWeapon - The weapon to save
	 * @return - The Id of the weapon saved
	 */
	public int save(IWeapon theWeapon);
	
	/**
	 * Load a Weapon from DataBase
	 * @param Id - The Id of the weapon to load
	 * @return - The weapon loaded
	 */
	public IWeapon loadWeapon(int Id);
	
	/**
	 * Add a weapon to de weapon list
	 * @param w - The weapon to add
	 */
	public void addWeapon(IWeapon w);

}
